-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[google_maps_flutter] Add cameraControl enable/disable & position on web #9089
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution! This PR looks good to me with a minor nit about improving doc comments. This is ready to split into separate PRs for landing
/// See [WebCameraControlPosition] for more details. | ||
final WebCameraControlPosition? webCameraControlPosition; | ||
|
||
/// This setting controls how the API handles cameraControl button on the map. Web only. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have a more descriptive comment here. Something like "Enables or disables the Camera controls."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart
Show resolved
Hide resolved
@@ -2,7 +2,7 @@ name: google_maps_flutter | |||
description: A Flutter plugin for integrating Google Maps in iOS and Android applications. | |||
repository: https://github.com/flutter/packages/tree/main/packages/google_maps_flutter/google_maps_flutter | |||
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22 | |||
version: 2.12.1 | |||
version: 2.12.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As indicated in the PR checklist, we follow semver, which requires changing the minor version when adding public API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of the google_maps_flutter_android
and google_maps_flutter_ios
changes can be reverted.
@@ -1,3 +1,7 @@ | |||
## 2.11.2 | |||
|
|||
* Adds support to camera control button on web. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Adds support for disabling or moving the camera control button on web."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
@@ -44,6 +46,16 @@ class MapConfiguration { | |||
/// See [WebGestureHandling] for more details. | |||
final WebGestureHandling? webGestureHandling; | |||
|
|||
/// This setting controls how the API handles cameraControl button position on the map. Web only. | |||
/// | |||
/// See [WebCameraControlPosition] for more details. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment here; the null behavior should be documented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
| LB RB | | ||
| BL BC BR | | ||
+----------------+ | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the purpose of duplicating this from the link below? It's not part of the doc comment, and the plugin will never be responsible for actually implementing this behavior, so it's not clear to me who the audience for this comment is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. I removed the duplicated info.
@@ -4,7 +4,7 @@ repository: https://github.com/flutter/packages/tree/main/packages/google_maps_f | |||
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22 | |||
# NOTE: We strongly prefer non-breaking changes, even at the expense of a | |||
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes | |||
version: 2.11.1 | |||
version: 2.11.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same versioning note here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
@4rthurmonteiro Are you still planning on updating this based on the feedback above and then splitting out the first sub-PR? |
Hi @stuartmorgan-g yes! |
…able & position on web (#9897) Platform interface portion of #9089. Part of flutter/flutter#167137 ## Pre-Review Checklist **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
Hey @stuartmorgan-g and @harryterkelsen the platform web PR is here #9921 |
… on web (#9921) Platform web portion of #9089. Part of flutter/flutter#167137 ## Pre-Review Checklist **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
Hey @stuartmorgan-g & @harryterkelsen I updated the PR with new platform-interface version & web version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
flutter/packages@5d785a0...42bb347 2025-09-03 [email protected] [google_maps_flutter] Fixes exception when dispose is called while asynchronous update from didUpdateWidget is executed (flutter/packages#9227) 2025-09-03 [email protected] [google_maps_flutter] Add cameraControl enable/disable & position on web (flutter/packages#9089) 2025-09-03 [email protected] [tool] Only license-check checked-in files (flutter/packages#9905) 2025-09-03 [email protected] [interactive_media_ads] Fixes preloading ad while another was playing on Android (flutter/packages#9904) 2025-09-02 [email protected] Update FWFWebViewFlutterWKWebViewExternalAPITests.swift (flutter/packages#9922) 2025-09-02 [email protected] Update Stubs for FlutterPluginRegistrar interface change (flutter/packages#9923) 2025-09-02 [email protected] [camera_android_camerax] Update Android minimum SDK version (flutter/packages#9945) 2025-09-02 [email protected] Roll Flutter from da5523a to 6b18740 (49 revisions) (flutter/packages#9926) 2025-09-02 [email protected] [various] Scrub pre-iOS-13 code (flutter/packages#9849) 2025-09-02 [email protected] [google_maps_flutter_web] Add cameraControl enable/disable & position on web (flutter/packages#9921) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Add support to camera control button on web.
Fixes flutter/flutter#167137
Pre-Review Checklist
[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or I have commented below to indicate which version change exemption this PR falls under1.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style, or I have commented below to indicate which CHANGELOG exemption this PR falls under1.///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.
Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2 ↩3